package com.mrd.evaluate.entity;

import org.hibernate.annotations.GenericGenerator;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

/**
 * Created by lenovo on 2016/8/29.
 */
@Entity(name = "P_EVALUATION_RECORD")
public class EvaluationRecord implements Serializable {
    private static final long serialVersionUID = 7362503143704772833L;
    /**
     * 编号
     */
    @Id
    @GeneratedValue(generator = "paymentableGenerator")
    @GenericGenerator(name = "paymentableGenerator", strategy = "uuid")
    @Column(name = "RECORD_ID_")
    private String recordId;
    /**
     * 父节点，评价回复的对象编号
     */
    @ManyToOne
    @JoinColumn(name = "P_ID_")
    private EvaluationRecord pEvaluationRecord;
    /**
     * 评价主表关联编号
     */
    @ManyToOne
    @JoinColumn(name = "EVAL_ID_")
    private Evaluation evaluation;
    /**
     * 评价/回复内容
     */
    @Column(name = "EVAL_CONTENT_")
    private String evalContent;
    /**
     * 评价/回复时间
     */
    @Column(name = "EVAL_TIME_")
    private Date evalTime;
    /**
     * 评价/回复人
     */
    @Column(name = "EVAL_PERSON_")
    private String evalPerson;
    /**
     * 评价/回复人编号
     */
    @Column(name = "EVAL_PERSON_ID_")
    private String evalPersonId;

    public String getRecordId() {
        return recordId;
    }

    public void setRecordId(String recordId) {
        this.recordId = recordId;
    }

    public String getEvalContent() {
        return evalContent;
    }

    public void setEvalContent(String evalContent) {
        this.evalContent = evalContent;
    }

    public Date getEvalTime() {
        return evalTime;
    }

    public void setEvalTime(Date evalTime) {
        this.evalTime = evalTime;
    }

    public String getEvalPerson() {
        return evalPerson;
    }

    public void setEvalPerson(String evalPerson) {
        this.evalPerson = evalPerson;
    }

    public String getEvalPersonId() {
        return evalPersonId;
    }

    public void setEvalPersonId(String evalPersonId) {
        this.evalPersonId = evalPersonId;
    }

    public EvaluationRecord getpEvaluationRecord() {
        return pEvaluationRecord;
    }

    public void setpEvaluationRecord(EvaluationRecord pEvaluationRecord) {
        this.pEvaluationRecord = pEvaluationRecord;
    }

    public Evaluation getEvaluation() {
        return evaluation;
    }

    public void setEvaluation(Evaluation evaluation) {
        this.evaluation = evaluation;
    }

    @Override
    public String toString() {
        return "EvaluationRecord{" +
                "recordId='" + recordId + '\'' +
                ", pEvaluationRecord=" + pEvaluationRecord +
                ", evaluation=" + evaluation +
                ", evalContent='" + evalContent + '\'' +
                ", evalTime=" + evalTime +
                ", evalPerson='" + evalPerson + '\'' +
                ", evalPersonId='" + evalPersonId + '\'' +
                '}';
    }
}
